package com.core.privilege.dao;

import java.util.List;

import com.core.privilege.dto.PrivilegeDto;
import com.core.privilege.dto.PrivilegeSearchCondition;
import com.core.privilege.pojo.Privilege;
import com.core.role.dto.RoleSearchCondition;
import com.core.role.pojo.Role;
import com.core.role.pojo.SysRolePrivilege;

public interface PrivilegeDao {
    Privilege getById(Privilege privilege);

    void add(Privilege privilege);
    
    void batAdd(SysRolePrivilege sysRolePrivilege);
    
    void batDelete(SysRolePrivilege sysRolePrivilege);

    void update(Privilege privilege);

    void delete(Privilege privilege);

    List<Privilege> searchPojo(PrivilegeSearchCondition sc);

    List<PrivilegeDto> searchDto(PrivilegeSearchCondition sc);

    Integer searchCnt(PrivilegeSearchCondition sc);

//======================================= new method create here ====================================/

    List<Privilege> searchPojoByRoleCode(Role role);
    List<Privilege> searchPojoByRoleId1(RoleSearchCondition usc);
    Integer searchPojoByRoleIdCnt(RoleSearchCondition usc);
    List<Privilege> searchPojoByRoleIdNot(RoleSearchCondition usc);
    Integer searchPojoByRoleIdNotCnt(RoleSearchCondition usc);
    Privilege getByCode(String code);

}
